Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): sync hook and mfa config to remote #2861

Merged
merged 6 commits into from
Nov 11, 2024
Merged

Conversation

sweatybridge
Copy link
Contributor

@sweatybridge sweatybridge commented Nov 8, 2024

What kind of change does this PR introduce?

part 4 of #2814

What is the new behavior?

Sync hook, mfa, and sessions config to remote.

Additional context

Add any other context or screenshots.

@coveralls
Copy link

coveralls commented Nov 8, 2024

Pull Request Test Coverage Report for Build 11772202395

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 59.788%

Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 11739597993: -0.03%
Covered Lines: 6383
Relevant Lines: 10676

💛 - Coveralls

@sweatybridge sweatybridge changed the title feat(config): sync hook config to remote feat(config): sync hook and mfa config to remote Nov 8, 2024
Comment on lines 61 to 70
assert.Contains(t, string(diff), `[hook.mfa_verification_attempt]`)
assert.Contains(t, string(diff), `-enabled = true`)
assert.Contains(t, string(diff), `+enabled = false`)
assert.Contains(t, string(diff), `uri = ""`)
assert.Contains(t, string(diff), `secrets = ""`)

assert.Contains(t, string(diff), `[hook.custom_access_token]`)
assert.Contains(t, string(diff), `-enabled = false`)
assert.Contains(t, string(diff), `+enabled = true`)
assert.Contains(t, string(diff), `uri = ""`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question

Is there an equivalent to toMatchInlineSnapshot in Go ? That could maybe be useful instead of repeating the contains for every line as it would also test for the lines order.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I'm aware of. But I'm interested as well.

A low hanging fruit is to write the expected diff output to a file under testdata for comparison.

pkg/config/templates/config.toml Show resolved Hide resolved
@sweatybridge sweatybridge merged commit 96136cf into develop Nov 11, 2024
9 checks passed
@sweatybridge sweatybridge deleted the sync-hook branch November 11, 2024 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants